﻿
using System;

namespace Okarito
{
    public sealed class Filter
    {
        public FilterType Type
        {
            get { return m_type; }
        }

        public string Title
        {
            get { return m_title; }
        }

        internal Filter(string id, FilterType type, string title)
        {
            m_id = id;
            m_type = type;
            m_title = title;
        }

        internal static FilterType ParseType(string type)
        {
            switch (type)
            {
            case "builtin": return FilterType.BuiltIn;
            case "saved": return FilterType.Saved;
            case "shared": return FilterType.Shared;
            default: throw new ArgumentOutOfRangeException("type");
            }
        }

        readonly string m_id;
        readonly FilterType m_type;
        readonly string m_title;
    }
}
